package com.ssy.lingxi.dto.response;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * 请款明细汇总数据
 * @author 彭冬冬
 * @version 2.0.0
 * @date 2022/3/8 14:22
 */
public class ApplyAmountDetailSunVO implements Serializable {
    private static final long serialVersionUID = 3476315570075080109L;

    public ApplyAmountDetailSunVO() {
    }

    public ApplyAmountDetailSunVO(Long orderId, BigDecimal orderAmount, BigDecimal taxRate, BigDecimal payAmount, BigDecimal unPayApplyAmount) {
        this.orderId = orderId;
        this.taxRate = taxRate;
        this.orderAmount = orderAmount;
        this.payAmount = payAmount;
        this.unPayApplyAmount = unPayApplyAmount;
        this.unApplyAmount = this.orderAmount.subtract(this.payAmount).subtract(this.unPayApplyAmount).setScale(2, RoundingMode.HALF_UP);
    }


    /**
     * 单据Id
     */
    private Long orderId;

    /**
     * 单据号
     */
    private String orderNO;

    /**
     * 单据摘要
     */
    private String orderAbstract;

    /**
     * 单据类型
     * 来源： ApplyAmountRowBillTypeEnum
     */
    private Integer orderType;

    /**
     * 单据类型名称
     */
    private String orderTypeName;

    /**
     * 单据状态
     */
    private String orderStatusName;

    /**
     * 单据时间
     */
    private Long orderTime;

    /**
     * 单据金额
     */
    private BigDecimal orderAmount;

    /**
     * 是否含税
     */
    private Integer hasTax;

    /**
     * 税率（百分比的分子部分）
     */
    private BigDecimal taxRate;

    /**
     * 已付款
     */
    private BigDecimal payAmount;

    /**
     * 已请款待付款
     */
    private BigDecimal unPayApplyAmount;

    /**
     * 待请款
     */
    private BigDecimal unApplyAmount;

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getOrderNO() {
        return orderNO;
    }

    public void setOrderNO(String orderNO) {
        this.orderNO = orderNO;
    }

    public String getOrderAbstract() {
        return orderAbstract;
    }

    public void setOrderAbstract(String orderAbstract) {
        this.orderAbstract = orderAbstract;
    }

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public String getOrderTypeName() {
        return orderTypeName;
    }

    public void setOrderTypeName(String orderTypeName) {
        this.orderTypeName = orderTypeName;
    }

    public String getOrderStatusName() {
        return orderStatusName;
    }

    public void setOrderStatusName(String orderStatusName) {
        this.orderStatusName = orderStatusName;
    }

    public Long getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Long orderTime) {
        this.orderTime = orderTime;
    }

    public BigDecimal getOrderAmount() {
        return orderAmount;
    }

    public void setOrderAmount(BigDecimal orderAmount) {
        this.orderAmount = orderAmount;
    }

    public Integer getHasTax() {
        return hasTax;
    }

    public void setHasTax(Integer hasTax) {
        this.hasTax = hasTax;
    }

    public BigDecimal getTaxRate() {
        return taxRate;
    }

    public void setTaxRate(BigDecimal taxRate) {
        this.taxRate = taxRate;
    }

    public BigDecimal getPayAmount() {
        return payAmount;
    }

    public void setPayAmount(BigDecimal payAmount) {
        this.payAmount = payAmount;
    }

    public BigDecimal getUnPayApplyAmount() {
        return unPayApplyAmount;
    }

    public void setUnPayApplyAmount(BigDecimal unPayApplyAmount) {
        this.unPayApplyAmount = unPayApplyAmount;
    }

    public BigDecimal getUnApplyAmount() {
        return unApplyAmount;
    }

    public void setUnApplyAmount(BigDecimal unApplyAmount) {
        this.unApplyAmount = unApplyAmount;
    }
}
